import service from '@/network/request';

// 获取验证码
export const captcha = (data) => {
  return service({
    url: '/user/captcha',
    method: 'get',
  })
}

//登录
export const login = (data) => {
  return service({
    url: '/user/login',
    method: 'post',
    data: data
  })
}
//获取用户信息
export const getSelfUserInfo = () => {
  return service({
    url: '/user/getSelfUserInfo',
    method: 'get'
  })
}


export const deleteUserList = (data) => {
  return service({
    url: '/user/deleteUserList',
    method: 'post',
    data: data,
  })
}

export const getUserList = (data) => {
    return service({
      url: '/user/getUserList',
      method: 'post',
      data: data,
    })
  }

export const updateUser = (data) => {
    return service({
        url: '/user/updateUser',
        method: 'post',
        data
    })
}

export const createUser = (data) => {
    return service({
        url: '/user/createUser',
        method: 'post',
        data
    })
}


